// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueResources from 'vue-resource'
//按需引入mint-ui的组件
import { Header,Swipe, SwipeItem, Button } from 'mint-ui'
//引入mint-ui的样式
import 'mint-ui/lib/style.css'
//引入MUI的样式
import '../lib/mui/css/mui.css'
import '../lib/mui/css/icons-extra.css'
import '../lib/mui/fonts/mui-icons-extra.ttf'
//导入格式化时间插件  cnpm i moment -S
import moment from 'moment'

Vue.config.productionTip = false
Vue.use(VueResources)
Vue.component(Header.name,Header)
Vue.component(Swipe.name, Swipe)
Vue.component(SwipeItem.name, SwipeItem)
Vue.component(Button.name,Button)

Vue.http.options.root="http://www.liulongbin.top:3005"

//定义全局过滤器
Vue.filter('dateFormat',function(dataStr,pattern="YYYY-MM-DD HH:mm:ss"){
  return moment(dataStr).format(pattern)
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
